1. Field of the Invention
The invention relates to pulse code modulation in telecommunication systems. In particular the present invention concerns a method for detecting a frame slip.
2. Description of the Related Art
In general, core networks of modern telecommunication systems are digital. However, the last mile connection is typically an analog twisted-pair cable. In a pair cable the received and sent signal is transmitted in the cable simultaneously. Thus cable resources are saved compared to a four lead cable. As the fixed line terminals are typically analog terminals, a signal conversion from analog to digital and vice versa is required.
PCM (Pulse Code Modulation) is a digital scheme for transmitting analog data. The PCM-signals are binary, that is, there are only two possible states, represented by logic 1 (high) and logic 0 (low). This is true no matter how complex the analog waveform happens to be. Using PCM, it is possible to digitize all forms of analog data, including full-motion video, voices, music, telemetry, and virtual reality.
To obtain PCM from an analog waveform at the source (transmitter end) of a communications circuit, the analog signal amplitude is sampled (e.g., measured) at regular time intervals. The sampling rate, or number of samples per second, is several times the maximum frequency of the analog waveform in cycles per second or hertz. The instantaneous amplitude of the analog signal at each sampling is rounded off to the nearest of several specific, predetermined levels. This process is called quantization. The number of levels is always a power of 2, for example, 8, 16, 32, or 64. These numbers can be represented by three, four, five, or six binary digits (bits) respectively. The output of a pulse code modulator is thus a series of digital samples that are binary numbers, each having some power of 2 possible different values.
At the destination (receiver end) of the communications circuit, a pulse code demodulator converts the digital samples back into pulses having the same quantum levels as those in the modulator. These pulses are further processed to restore the original analog waveform. If the sampling rates of the modulator and demodulator are not exactly the same, eventually the demodulator is going to receive some digital sample earlier or later than it is expecting. This is called frame slip. As a result of a frame slip one digital sample in the series of samples is lost (negative slip) or one sample is repeated twice in (positive slip). The effect on the analog waveform is as if the frequency of the analog waveform changed momentarily by relatively small value.
In a telecommunication network there are several pieces of equipment located between the modulator and demodulator in the transmission path of the pulse code modulated signal. Each of these pieces of equipment may have different clock rate. In order to minimize the effect on the analog waveform unsynchronized digital signal processing equipment occasionally has to duplicate or delete one digital sample. As a result pulse code modulated signals in telecommunication networks have frame slips.
ETSI TS 101 504 V8.0.1 (2000-08) standard, which is included here by reference, describes an inband signalling protocol between transcoder and rate adapter units for speech traffic channels in tandem free operation of speech codecs. In this protocol communications are handled with inband signalling messages. Inband signalling messages are transmitted by replacing the least significant bit of some of the digital samples by a bit of inband signalling message. In the standard, digital samples are called octets because they consists of 8 bits and the interval in which the least significant bit of octet is replaced is defined to be 16 samples. Generally similar inband signalling can be carried in the least significant bit of every Nth digital sample and digital sample can be some other number of bits than 8. Furthermore the standard defines inband signalling messages to be constructed of 20 and 10 bit long blocks. Generally N bit long mocks can be considered.
The standard discloses several error detecting and correcting situations based on the limited number of allowed 20 or 10 bit blocks among all possibilities of 20 or 10 bit blocks. The standard suggests assuming hypothetical octet slip for finding error-free or single-error message. An octet slip is a situation in which sequence of octets has slipped one octet forward or backward. As a result a block of inband signalling bits taken from least significant bit of every 16th octet contains only the first part of the intended 20 or 10 bits. Bits that arrive after the octet slip have shifted into an adjacent block can be found in the least significant bit of every preceding or succeeding 16th octet. If an error-free or a single-error inband signalling message can be found after considering a hypothetical octet slip (±1 octet), then it may be regarded as error-free or single-error and the new phase position will be regarded as valid provided that no valid or present inband signalling message can be found at the old phase position. However, even though the standard suggests assuming the octet slip, it does not provide any means for detecting an octet slip within inband signalling block.
One solution for detecting an octet slip is to take first k bit of the inband signalling message block from found PCM sample grid and 20-k or 10-k last bits from the ±1 position and join the k bit field with 20-k or 10-k bit field to form the octet slipped block and calculate the number of error bits. Because the time of the octet slip is not known beforehand in the worst case this has to be repeated for all values of k=1 . . . 20 or 10 until right value of k is found. FIG. 1 illustrates an example situation where k=4. Bits a are the least significant bits of previously found 16 octet grid. Bits b are the least significant bits of preceding or succeeding 16 octet grid. Normally the 10 bit block of inband signalling message should consist of the a bits. However because of an octet slip somewhere between bits 4 and 5 the last bits of block appear in b bits instead. A device that is supposed to interpret inband signalling messages does not know in advance at which point the octet slip has occurred. Therefore it has to try to match different combinations of a and b bits with acceptable bit patterns before it finds out, for example, that a combination of the first 4 a bits and 6 last b bits produces expected result. For N bit block there are N different possibilities where octet slip may have occurred. Therefore there are N different combinations of a and b bits. The investigation of whether a combination is right or not takes time proportional to N.
The drawback of the above-described solution is the 0(N2) complexity. 0(N2) complexity means that time required to compute the algorithm is related to the square of the input size. Thus there is obvious need for an efficient method for detecting an octet slip in an inband signalling block.
Accordingly, it would be desirable to have a more efficient method for detecting an octet slip in pulse code modulation in telecommunication systems.